package cn.xs.order.entity;

import cn.xs.goods.entity.Good;
import cn.xs.user.entity.User;

/**
 * 购物车项
 *
 */
public class CarItem {
	
	private String id;
	private Good good;
	private int quantity;
	private double price;
	
	
	public CarItem(String id, Good good, int quantity) {
		this.id = id;
		this.good = good;
		this.quantity = quantity;
	}
	public CarItem() {
	}
	public Good getGood() {
		return good;
	}
	public void setGood(Good good) {
		this.good = good;
	}
	public int getQuantity() {
		return quantity;
	}
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	public double getPrice() {
		price = good.getPrice()*quantity;
		return price;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	
}
